# -*- coding:utf-8 -*-
from config.setting_globle import SettingGloble
from framework.constant.Testing import Testing

# 数据库连接
class SettingProd(SettingGloble):
    ENVNAME = '生产环境'
    DEBUG_MODEL_SWITCH = False #服务debug模式只在dev环境开启
    # 数据库连接
    SQLALCHEMY_DATABASE_URI = "mysql+pymysql://用户:密码@host/库名"
    SQLALCHEMY_BINDS = {
        Testing.TEST_DB: "mysql+pymysql://用户:密码@host/库名",
    }
    SQLALCHEMY_ECHO = True
    SQLALCHEMY_ENGINE_OPTIONS = {
        'echo_pool': True,
        'pool_size': 5,
        'max_overflow': 10,
        'pool_recycle': 30
    }
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    SQLALCHEMY_COMMIT_ON_TEARDOWN = True

    XXLJOB_CALLBACK_URL = "http://xxl-job.airqualitychina.cn:9999/xxl-job-admin/api/callback"

    KAFKA_SWITCH = False #kafka开关
    KAFKA_TOPIC = "qc_topic"   #接受质控后的topic
    KAFKA_GROUP_ID = "qc_group_id"
    KAFKA_BOOTSTRAP_SERVERS = ['112.126.86.53:9092', '112.126.86.53:9093', '112.126.86.53:9094']